import request from '@/utils/request'
const serviceName = 'System'

export function getTopMenus() {
  return request({
    url: serviceName + '/Menu/GetTopMenus',
    method: 'post'
  })
}

export function getSubMenus(data) {
  return request({
    url: serviceName + '/Menu/GetSubMenus',
    method: 'post',
    data
  })
}

export function saveMenu(data) {
  return request({
    url: serviceName + '/Menu/SaveMenu',
    method: 'post',
    data
  })
}

export function removeMenu(data) {
  return request({
    url: serviceName + '/Menu/RemoveMenu',
    method: 'post',
    data
  })
}

export function getGroupList(data) {
  return request({
    url: serviceName + '/Menu/GetSceneGroupList',
    method: 'post',
    data
  })
}

export function getSceneList(data) {
  return request({
    url: serviceName + '/Menu/GetSceneList',
    method: 'post',
    data
  })
}

export function sortMenu(data) {
  return request({
    url: serviceName + '/Menu/SortMenu',
    method: 'post',
    data
  })
}

export function sortScene(data) {
  return request({
    url: serviceName + '/Menu/SortScene',
    method: 'post',
    data
  })
}

export default {
  getTopMenus,
  getSubMenus,
  saveMenu,
  removeMenu,
  getGroupList,
  getSceneList,
  sortMenu,
  sortScene
}
